package com.lingyue.entity.module.biz.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.lingyue.entity.groups.Create;
import com.lingyue.entity.groups.Modify;
import com.lingyue.entity.groups.customer.Edit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author lizhiyuan
 * @since 2019-11-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("customer")
@ApiModel(value="CustomerEntity对象", description="")
public class CustomerEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "CUS_ID", type = IdType.ASSIGN_ID)
    @NotNull(groups = {Modify.class, Edit.class}, message = "主键ID不能为空")
    private Long id;

    @ApiModelProperty(value = "接口唯一标识代码")
    @TableField("CUS_API_UNIQUE_KEY")
    private String apiUniqueKey;

    @ApiModelProperty(value = "经销商ID")
    @TableField("CUS_DEL_ID")
    private Long delId;

    @ApiModelProperty(value = "客户编号")
    @TableField("CUS_CUSTOMER_ID")
    private String customerId;

    @ApiModelProperty(value = "同意使用数据：Y、N(默认)")
    @TableField("CUS_DATA_PRIVACY")
    private String dataPrivacy;

    @ApiModelProperty(value = "拒绝所有联系")
    @TableField("CUS_REFUSE_CONTACT")
    private String refuseContact;

    @ApiModelProperty(value = "销售顾问姓名(称呼)")
    @TableField("CUS_SA_NAME")
    private String saName;

    @ApiModelProperty(value = "客户姓名")
    @NotBlank(groups = {Create.class, Modify.class, Edit.class}, message = "客户姓名不能为空")
    @TableField("CUS_NAME")
    private String name;

    @ApiModelProperty(value = "性别: M:男生、F:女士")
    @NotBlank(groups = {Create.class, Modify.class, Edit.class}, message = "客户性别不能为空")
    @TableField("CUS_GENDER")
    private String gender;

    @ApiModelProperty(value = "客户生日")
    @TableField("CUS_DOB")
    private LocalDate dob;

    @ApiModelProperty(value = "手机号")
    @NotBlank(groups = {Create.class, Modify.class, Edit.class}, message = "手机号不能为空")
    @TableField("CUS_MOBILE")
    private String mobile;

    @ApiModelProperty(value = "备用手机号")
    @TableField(value = "CUS_MOBILE_SPARE", updateStrategy = FieldStrategy.IGNORED)
    private String mobileSpare;

    @ApiModelProperty(value = "城市")
    @TableField("CUS_CITY")
    private String city;

    @ApiModelProperty(value = "E-MAIL")
    @TableField("CUS_EMAIL")
    private String email;

    @ApiModelProperty(value = "公司")
    @TableField("CUS_COMPANY")
    private String company;

    @ApiModelProperty(value = "感兴趣车型")
    @TableField("CUS_VEH_INTEREST")
    private String vehInterest;

    @ApiModelProperty(value = "学历行业")
    @TableField("CUS_OVERALL_COMMENTS")
    private String overallComments;

    @ApiModelProperty(value = "SFM stage code(NSP)  --销售漏斗")
    @TableField("CUS_SALES_FUNNEL_STAGE")
    private String salesFunnelStage;

    @ApiModelProperty(value = "SFM color code(NSP)  --销售漏斗")
    @TableField("CUS_SALES_FUNNEL_LEADS_COLOR")
    private String salesFunnelLeadsColor;

    @ApiModelProperty(value = "SFM Duration in days(NSP)  --销售漏斗")
    @TableField("CUS_SALES_FUNNEL_DURATION")
    private Integer salesFunnelDuration;

    @ApiModelProperty(value = "客户安全状态：S - Satisfied、N – Neutral、D – Dissatisfied")
    @TableField("CUS_SATISFACTION")
    private String satisfaction;

    @ApiModelProperty(value = "Customer value # of cars")
    @TableField("CUS_VALUE_NO_OF_CAR")
    private String valueNoOfCar;

    @ApiModelProperty(value = "试驾备注信息")
    @TableField("CUS_TD_COMMENTS")
    private String tdComments;

    @ApiModelProperty(value = "May contain line break <BR> tags")
    @TableField("CUS_OPEN_COMPLAINTS")
    private String openComplaints;

    @ApiModelProperty(value = "客户合作类型")
    @TableField("CUS_PARTNER_TYPE")
    private String partnerType;

    @ApiModelProperty(value = "Bmw Blacklist")
    @TableField("CUS_KR_BLOCK")
    private String krBlock;

    @ApiModelProperty(value = "客户数据来源：NSP:NSP导入 BATCH:经销商批量上传 ASSISTANT:专员上传 ")
    @TableField("CUS_DATA_SOURCE")
    private String dataSource;

    @ApiModelProperty(value = "备注")
    @TableField("CUS_REMARK")
    private String remark;

    @ApiModelProperty(value = "是否有效标识，Y/N")
    @TableField("CUS_VALID_FLAG")
    private String validFlag;

    @TableField("CUS_CREATE_USER")
    private String createUser;

    @TableField("CUS_CREATE_DATE")
    private LocalDateTime createDate;

    @TableField("CUS_UPDATE_USER")
    private String updateUser;

    @TableField("CUS_UPDATE_DATE")
    private LocalDateTime updateDate;


    public static final String CUS_ID = "CUS_ID";

    public static final String CUS_DEL_ID = "CUS_DEL_ID";

    public static final String CUS_API_UNIQUE_KEY = "CUS_API_UNIQUE_KEY";

    public static final String CUS_CUSTOMER_ID = "CUS_CUSTOMER_ID";

    public static final String CUS_DATA_PRIVACY = "CUS_DATA_PRIVACY";

    public static final String CUS_REFUSE_CONTACT = "CUS_REFUSE_CONTACT";

    public static final String CUS_SA_NAME = "CUS_SA_NAME";

    public static final String CUS_NAME = "CUS_NAME";

    public static final String CUS_GENDER = "CUS_GENDER";

    public static final String CUS_DOB = "CUS_DOB";

    public static final String CUS_MOBILE = "CUS_MOBILE";

    public static final String CUS_MOBILE_SPARE = "CUS_MOBILE_SPARE";

    public static final String CUS_CITY = "CUS_CITY";

    public static final String CUS_EMAIL = "CUS_EMAIL";

    public static final String CUS_COMPANY = "CUS_COMPANY";

    public static final String CUS_VEH_INTEREST = "CUS_VEH_INTEREST";

    public static final String CUS_OVERALL_COMMENTS = "CUS_OVERALL_COMMENTS";

    public static final String CUS_SALES_FUNNEL_STAGE = "CUS_SALES_FUNNEL_STAGE";

    public static final String CUS_SALES_FUNNEL_LEADS_COLOR = "CUS_SALES_FUNNEL_LEADS_COLOR";

    public static final String CUS_SALES_FUNNEL_DURATION = "CUS_SALES_FUNNEL_DURATION";

    public static final String CUS_SATISFACTION = "CUS_SATISFACTION";

    public static final String CUS_VALUE_NO_OF_CAR = "CUS_VALUE_NO_OF_CAR";

    public static final String CUS_TD_COMMENTS = "CUS_TD_COMMENTS";

    public static final String CUS_OPEN_COMPLAINTS = "CUS_OPEN_COMPLAINTS";

    public static final String CUS_PARTNER_TYPE = "CUS_PARTNER_TYPE";

    public static final String CUS_KR_BLOCK = "CUS_KR_BLOCK";

    public static final String CUS_DATA_SOURCE = "CUS_DATA_SOURCE";

    public static final String CUS_REMARK = "CUS_REMARK";

    public static final String CUS_VALID_FLAG = "CUS_VALID_FLAG";

    public static final String CUS_CREATE_USER = "CUS_CREATE_USER";

    public static final String CUS_CREATE_DATE = "CUS_CREATE_DATE";

    public static final String CUS_UPDATE_USER = "CUS_UPDATE_USER";

    public static final String CUS_UPDATE_DATE = "CUS_UPDATE_DATE";

}
